package day05.work03;

public class Student extends Person{
    private int id;
    private int score;

    public Student(){}
    public Student(String name,int age,int id,int score){
        super(name,age);
        this.id=id;
        this.score=score;
    }

    public void study(){
        System.out.println(getName()+"开始学习");
    }

    @Override
    public void run(){
        System.out.println(getName()+"跑起来");
    }

    @Override
    public void sing(){
        System.out.println("学生也会唱歌");
    }

    IFlyAble flyAble=new IFlyAble() {

        @Override
        public void fly() {
            System.out.println("怕不是被创飞");
        }
        
    };

    @Override
    public String toString() {
        return "Student [id=" + id + ", score=" + score + ", flyAble=" + flyAble + ", getName()=" + getName()
                + ", getAge()=" + getAge() + "]";
    }
    

}
